package C616;

public class Teacher extends Person
{
	
	String department;//部门
	
	int schoolAge;//教龄
	
	public Teacher()
	{
		System.out.println("构造器Teacher()被调用");
	}
	
	public Teacher(String name)
	{
		//调用父类中的构造器Person(String theName)
		super(name);
		System.out.println("构造器Teacher(String name)被调用");
	}
	
	public Teacher(int theSchoolAge)
	{		 
		this.schoolAge = theSchoolAge;
    	System.out.println("构造器 Teacher(int theSchoolAge)被调用 	schoolAge = "+	schoolAge);
	}
	
	public Teacher(String dept,int theSchoolAge)
	{
		//调用本类中重载的构造器Teacher(int theSchoolAge)
		this(theSchoolAge);
		department = dept;
	System.out.println("构造器 Teacher(String dept,int theSchoolAge)被调用 	department = "+	dept);	
	}		
	//初始化块
	{
		this.department = "教务部";
		System.out.println("Teacher初始化块执行后：name="+this.name
			+" ,age="+this.age+" ,sex="+this.sex+",department ="+this.department);
	}	
}
